package org.mclll.xwangplugin.web.controller;

import com.alibaba.fastjson.JSONObject;
import org.bukkit.Bukkit;
import org.eclipse.jetty.server.Request;
import org.mclll.xwangplugin.web.util.HttpServlet;
import org.mclll.xwangplugin.web.util.MyServlet;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@MyServlet("/error")
public class DefaultServlet implements HttpServlet {
    @Override
    public String run(Request baseRequest, HttpServletRequest request, HttpServletResponse response) {
        JSONObject jsonRet = new JSONObject();
        jsonRet.fluentPut("status", 500)
                .fluentPut("message", "系统错误");
        return jsonRet.toJSONString();
    }
}
